const path = require("path");
const HtmlWebpack = require('html-webpack-plugin');
const { devtools } = require("vue");
module.exports = {
  mode: "production",
  output: {
    clean: true,
  },
  module:{
    rules:[
        {
            test:/\.css$/,
            use: ["style-loader","css-loader"]
        },
        {
          test:/\.(png|jpg|jpeg|gif)$/,
          type: 'asset/resource'
        },
        {
          test: /\.m?js$/,
          exclude: /(node_modules|bower_components)/,
          use: {
            loader: 'babel-loader',
            options: {
              presets: ['@babel/preset-env'],
            },
          },
        },
    ]
  },
  plugins:[new HtmlWebpack({
    title:"你好啊",
    template: "./src/demo.html"
  })],
  devtool:"inline-source-map"
};